﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace Barbar.Colonization.Model {
  public class City : Entity, IStepExecute, IUnitLocation {
    private CityType m_CityType;
    protected string m_Name;
    private Race m_Race;
    private CityStore m_CityStore;
    private Collection<Building> m_Buildings = new Collection<Building>();
    private Collection<CityLocation> m_CityLocations = new Collection<CityLocation>();

    public CityType CityType {
      get { return m_CityType; }
      protected set { m_CityType = value; }
    }

    public string Name {
      get { return m_Name; }
      protected set { m_Name = value; }
    }

    public Race Race {
      get { return m_Race; }
      protected set { m_Race = value; }
    }

    public CityStore Store {
      get { return m_CityStore; }
      protected set { m_CityStore = value; }
    }

    public IList<Building> Buildings {
      get { return m_Buildings; }
    }

    #region IStepExecute Members

    public void ExecuteStep() {
      foreach (Building building in m_Buildings)
        building.ExecuteStep();
    }

    #endregion

    #region IUnitLocation Members

    void IUnitLocation.PlaceNewUnit(Unit unit) {
      
    }

    #endregion
  }
}
